package org.hard.service;

import cn.hutool.core.util.RandomUtil;
import org.hard.entity.FileInfo;
import org.hard.mapper.FileInfoMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author: 王林博
 * @date: 2024年05月18日 19:26
 */
@Service
public class FileInfoService {

    @Resource
    private FileInfoMapper fileInfoMapper;

//    @Transactional
    public void save(){
        System.out.println("造异常");
        FileInfo fileInfo = new FileInfo();
        fileInfo.setFileName(RandomUtil.randomNumbers(10));
        fileInfo.setFileType("1");
        fileInfo.setDeleteFlag("0");
        fileInfo.setFileUrl("异常");
        fileInfoMapper.insert(fileInfo);
//        Integer num = null;
//        int b = num;
    }
}
